<% add_decidim_meta_tags(
  description: translated_attribute(current_component.participatory_space.try(:description)),
  title: component_name,
  url: results_url,
  resource: current_component) %>

<%= append_javascript_pack_tag "decidim_accountability" %>
<%= append_stylesheet_pack_tag "decidim_accountability" %>

<% content_for :aside do %>
  <%= render partial: "home_aside" %>
<% end %>

<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
  <% if Decidim::Map.available?(:geocoding, :dynamic) && component_settings.geocoding_enabled? %>
    <div class="accountability__map">
      <%= cell "decidim/map", @all_geocoded_results, metadata_card: "decidim/accountability/result_metadata" %>
    </div>
  <% end %>

  <section class="layout-main__section">
    <div class="editor-content"><%= decidim_sanitize_admin translated_attribute(component_settings.intro) %></div>
  </section>

  <% if selected_root_taxonomy.present? %>
    <section class="layout-main__section">
      <%= render partial: "home_taxonomies" %>
    </section>
  <% else %>
    <section id="results" class="layout-main__section">
      <%= cell "decidim/accountability/results", results %>
      <%= decidim_paginate results, order_start_time: params[:order_start_time] %>
    </section>
  <% end %>
<% end %>
